@extends('layout.admin')

@section('title')
<title>用户修改</title>
@endsection

@section('content')
@if(count($errors)>0)
<div class="alert alert-danger">
  出错啦哦!!!
  @foreach($errors->all() as $error)
  <button type="button" class="close" data-dismiss="alert">×</button>
  <strong>{{$error}}</strong>
  @endforeach
</div>
@endif
  <div class="row"> 
   <div class="col-xs-12"> 
    <div class="panel"> 
     <div class="panel-heading bk-bg-primary"> 
      <h6><i class="fa fa-indent red"></i>用户修改</h6> 
      <div class="panel-actions"> 
       <a class="btn-setting" href="#"><i class="fa fa-rotate-right black"></i></a> 
       <a class="btn-minimize" href="#"><i class="fa fa-chevron-up black"></i></a> 
       <a class="btn-close" href="#"><i class="fa fa-times black"></i></a> 
      </div> 
     </div> 
     <div class="panel-body bk-bg-white bk-padding-top-30 bk-padding-bottom-20"> 
      <form action="/user/{{$user->id}}" method="post" enctype="multipart/form-data" class="form-horizontal form-bordered"> 
       <div class="form-group"> 
        <label class="col-md-3 control-label">用户名</label> 
        <div class="col-md-6"> 
         <div class="input-group"> 
          <span class="input-group-addon"> <i class="fa fa-user"></i> </span> 
          <input class="form-control" type="text" name="username" value="{{$user['username']}}"/> 
         </div> 
        </div> 
       </div> 
       <div class="form-group"> 
        <label for="fc_inputmask_1" class="col-md-3 control-label">邮箱</label> 
        <div class="col-md-6"> 
         <div class="input-group"> 
          <span class="input-group-addon"> <i class="fa fa-envelope-o"></i> </span> 
          <input class="form-control" type="text" name="email" value="{{$user['email']}}" /> 
         </div> 
        </div> 
       </div> 
       <div class="form-group"> 
        <label for="fc_inputmask_1" class="col-md-3 control-label">手机号码</label> 
        <div class="col-md-6"> 
         <div class="input-group"> 
          <span class="input-group-addon"> <i class="fa fa-phone"></i> </span> 
          <input class="form-control" type="text" name="phone" value="{{$user['phone']}}"/> 
         </div> 
        </div> 
       </div> 
       <div class="form-group"> 
        <label for="fc_inputmask_1" class="col-md-3 control-label">性别</label> 
        <div class="col-md-9"> 
          <div class="radio-custom radio-inline">
			<input type="radio" value="1" name="sex" @if($user['sex']) == 1) checked @endif> 
		    <label for="inline-radio1">男</label>
		  </div>
		  <div class="radio-custom radio-inline">
			<input type="radio" value="0" name="sex" @if($user['sex'] == 0) checked @endif> 
		    <label for="inline-radio1">女</label>
		  </div>
        </div> 
       </div> 
       <div class="form-group"> 
        <label for="fc_inputmask_1" class="col-md-3 control-label">用户头像</label> 
        <div class="col-md-6"> 
         <div class="input-group"> 
          <div style="width:150px;height:150px;border:1px solid cyan;float:left">
			       <img src="{{$user->profile}}" width="150px" height="150px">
          </div>
          <input type="file" name="profile" style="padding-left:200px"/>
         </div> 
        </div> 
       </div> 
		<div class="form-group">
		 <label class="col-md-3 control-label"></label>
			<div class="col-md-6 col-xs-11">
				{{csrf_field()}}
        <input type="hidden" name="_method" value="put"> 
				<button type="submit" class="btn btn-sm btn-info">修改</button>
				<button type="submit" class="btn btn-sm btn-danger">重置</button>
			</div>
		</div>
      </form> 
     </div> 
    </div> 
   </div> 
  </div>
 </body>
</html>




@endsection